<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>医疗系统</title>
    <script src="/jquery/jquery-3.1.0.min.js"></script>
    <script src="/js/bootstrap.js"></script>
    <link href="/images/favicon.ico" rel="icon">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/fonts/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="/css/jquery-confirm.min.css" rel="stylesheet" type="text/css">
    <link href="/css/nprogress.css" rel="stylesheet" type="text/css">
    <link href="/css/zhp.core.css" rel="stylesheet" type="text/css">
</head>

<body class="login">
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     data-backdrop="static"
     data-keyboard="false">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-body">
                <div class="login_wrapper">
                    <div class="animate form login_form" style="position: relative;">
                        <section class="login_content">
                            <form action="/a/signin" method="POST" id="login-form">
                                <h1>登录管理系统</h1>
                                <div>
                                    <input type="text" class="form-control" placeholder="请输入用户名" name="username" value="<#if userName?exists>${userName}<#else></#if>"
                                           required=""/>
                                </div>
                                <div>
                                    <input type="password" class="form-control" placeholder="请输入密码" name="password"
                                           required=""/>
                                </div>
                                <#if exception?exists><span style="color: red">${exception}</span><#else></#if>
                                <div class="form-group" style="text-align : left">
                                    <label><input type="checkbox" id="rememberMe" name="rememberMe"
                                                  style="width: 12px; height: 12px;margin-right: 5px;">记住我</label>
                                </div>
                                <div>
                                    <button type="submit" class="btn btn-success btn-login" style="width: 100%;">登录
                                    </button>
                                </div>

                                <div class="clearfix"></div>

                                <div class="separator">
                                    <div class="clearfix"></div>
                                    <div>
                                        <#--<h1><i class="fa fa-coffee"></i> Shiro权限管理后台</h1>-->
                                        <#--<p>Copyright © 2018 <a href="https://www.baidu.com">zp</a>. All Rights Reserved.-->
                                        </p>
                                    </div>
                                </div>
                            </form>
                        </section>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<#include "include/footer.ftl"/>
</body>

<script>
    $("#modal").modal('show');
    // $(".btn-login").click(function () {
    //     $.ajax({
    //         type: "POST",
    //         url: "/a/signin",
    //         data: $("#login-form").serialize(),
    //         dataType: "json",
    //         success: function (json) {
    //             if (json.status === 200) {
    //                 window.location.href = "/a";
    //             } else {
    //                 $.tool.ajaxSuccess(json);
    //                 $("#img-kaptcha").attr("src", '/getKaptcha?time=' + new Date().getTime());
    //             }
    //         }
    //     });
    // });
    // $("#img-kaptcha").click(function () {
    //     $(this).attr("src", '/getKaptcha?time=' + new Date().getTime());
    // });
    document.onkeydown = function (event) {
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if (e && e.keyCode === 13) {
            $(".btn-login").click();
        }
    };
</script>
</html>
